﻿<select class="hourselect" @bind="Hour">
    @foreach (var hour in HoursRange)
    {
        <option value="@hour" selected="@(Hour == hour)">@hour.ToString().PadLeft(2, '0')</option>
    }
</select>
<span> : </span>
<select class="minuteselect" @bind="Minute">
    @foreach (var minute in MinutesRange)
    {
        if (minute % Picker.TimePickerIncrement != 0) continue;
        <option value="@minute" selected="@(Minute == minute)">@minute.ToString().PadLeft(2, '0')</option>
    }
</select>

@if (Picker.TimePickerSeconds == true)
{
    <span> : </span>
    <select class="minuteselect" @bind="Second">
        @foreach (var sec in SecondsRange)
        {
            <option value="@sec" selected="@(Second == sec)">@sec.ToString().PadLeft(2, '0')</option>
        }
    </select>
}

@if (Picker.TimePicker24Hour == false)
{
    <span>&nbsp;</span>
    <select class="ampmselect" @bind="AmPm">
        <option value="@(AmPmEnum.AM)">AM</option>
        <option value="@(AmPmEnum.PM)">PM</option>
    </select>
}